<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    let nums = [96,3213,515,56,1,64,61,5,233,4,84,51,1,654,8,685]
    for(let i = 0; i < nums.length; i++){
      for(let j = i; j > 0; j--){
        if(nums[j] < nums[j-1]){
          k = nums[j-1]
          nums[j-1] = nums[j]
          nums[j] = k
        }
      }
    }
    console.log(nums)
  </script>
</body>
</html>